<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="fairshop">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="document">
          <xs:complexType>
            <xs:attribute name="widthInCm" type="xs:string" use="required" />
            <xs:attribute name="heightInCm" type="xs:string" use="required" />
            <xs:attribute name="leftMarginInCm" type="xs:string" use="required" />
            <xs:attribute name="topMarginInCm" type="xs:string" use="required" />
            <xs:attribute name="font" type="xs:string" use="required" />
            <xs:attribute name="fontsize" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
        <xs:element name="blokken" type="blokkenType"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="blokkenType">
    <xs:sequence >
      <xs:element maxOccurs="unbounded" name="blok" type="blokType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="blokType">
    <xs:sequence>
      <xs:element name="rijen" maxOccurs="unbounded" type="rijenType" />
    </xs:sequence>
    <xs:attribute name="naam" type="xs:string" use="required" />
    <xs:attribute name="herhaald" type="xs:boolean" default="false" />
  </xs:complexType>
  <xs:complexType name="celType">
    <xs:attribute name="width" type="xs:string" use="optional" />
    <xs:attribute name="id" type="xs:string" use="optional" />
    <xs:attribute name="textalign" type="xs:string" use="optional" />
    <xs:attribute name="font" type="xs:string" use="optional" />
    <xs:attribute name="fontsize" type="xs:string" use="optional" />
    <xs:attribute name="fontweight" type="xs:string" use="optional" />
    <xs:attribute name="tekst" type="xs:string" use="optional" />
    <xs:attribute name="afbeelding" type="xs:string" use="optional" />
    <xs:attribute name="backcolor" type="xs:string" use="optional" />
    <xs:attribute name="border" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:complexType name="cellenType">
    <xs:sequence>
      <xs:element name="cel" maxOccurs="unbounded" type="celType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="rijType">
    <xs:sequence>
      <xs:element name="cellen" type="cellenType" />
    </xs:sequence>
    <xs:attribute name="height" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:complexType name="sjabloonrijType">
    <xs:sequence>
      <xs:element name="cellen" type="cellenType" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="rijenType">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded" >
        <xs:element name="rij" minOccurs="0" maxOccurs="unbounded" type="rijType" />
        <xs:element name="titelrij" minOccurs="0" type="rijType" />
        <xs:element name="sjabloonrij" minOccurs="0" type="sjabloonrijType" />
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
